package com.example.mntz.service.Impl;

import com.example.mntz.dao.CollectionPageMapper;
import com.example.mntz.model.Collectionpage;
import com.example.mntz.service.CollectionPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CollectionPageServiceImpl implements CollectionPageService {
    @Autowired
    CollectionPageMapper mapper;
    @Override
    public String havePage(String page, Integer uId) {
        String collection = mapper.havePage(page,uId);
        if(collection!=null && !"".equals(collection)){
            return "sc";
        }
        return "wsc";
    }

    @Override
    public void removePage(String page, Integer getuId) {
        mapper.removePage(page,getuId);
    }

    @Override
    public void insertPage(Collectionpage page) {
        mapper.insertPage(page);
    }
}
